<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>经典网页布局</title>
    <style>
        .div-whole {
            display: flex;
            width: 300px;
            height: 500px;
            flex-direction: column;

        }

        .div-whole .div-head {
            background-color: green;
            height: 50px;
            text-align: center;
            line-height: 50px;
        }

        .div-whole .div-body {
            display: flex;
            background-color: blue;
            /* 占剩余所有空间 */
            flex: 1;
            /*align-items: center;*/
            text-align: center;
        }

        .div-whole .div-body .div-side{
            background-color: blue;
            /* 占剩余所有空间 */
            flex: 1;
        }

        .div-whole .div-body .div-main{
            background-color: pink;
            /* 占剩余所有空间 */
            flex: 2;
        }

        .div-whole .div-footer {
            background-color: red;
            height: 60px;
            text-align: center;
            line-height: 60px;
        }
    </style>
</head>
<body>
    <header>经典网页布局</header>
    <div class="div-whole">
        <div class="div-head">头部</div>
        <div class="div-body">
            <div class="div-side">侧边栏</div>
            <div class="div-main">主体</div>
        </div>
        <div class="div-footer">底部</div>
    </div>
</body>
</html>